<!DOCTYPE html>
<html>
  <head>
    <title>Australia Mart</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/styles/importer.css">
    <link rel="stylesheet" href="/styles/light7-swipeout.css">
    <link rel="stylesheet" href="/styles/light7-swiper.css">
    <link rel="stylesheet" href="/styles/light7.css">
    <link rel="stylesheet" href="/styles/custom.css">
    <!--STYLES END-->
    <script type="text/javascript" src="/js/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="/js/light7.js"></script>
    <script type="text/javascript" src="/js/light7-swiper.js"></script>
    <script type="text/javascript" src="/js/light7-swipeout.js"></script>
    <!--<script type="text/javascript" src="/js/common.js"></script>-->
  </head>
  <style>
    .panel-left .item-content.active {
      color: #fff;
      /*background: #ccc;*/
    }
  </style>
  <body>
  <!-- 标题栏 -->



    <%- body %>

    <!--底部-->
    <nav class="bar bar-tab">
      <a class="tab-item external active" href="/">
        <span class="icon icon-home"></span>
        <span class="tab-label">首页</span>
      </a>
      <a class="tab-item external" href="/list">
        <span class="icon icon-menu"></span>
        <span class="tab-label">商品</span>
      </a>
      <!--<a class="tab-item external" href="/cart">-->
        <!--<span class="icon icon-cart"></span>-->
        <!--<span class="tab-label">购物车</span>-->
      <!--</a>-->
      <a class="tab-item external" href="/users">
        <span class="icon icon-me"></span>
        <span class="tab-label">我的</span>
      </a>
    </nav>

  <!-- popup, panel 等放在这里 -->
  <div class="panel-overlay"></div>

    <script type="text/javascript">
      $(function(){
        $.init();
//        底部
        var pathname = window.location.pathname;
        pathname = pathname.replace(/\//,'');
        console.log(pathname);
        var tabs = ['','list','users'];
        for(var i in tabs){
            if(pathname == tabs[i]){
                $('.bar-tab .tab-item').eq(i).addClass('active').siblings('.tab-item').removeClass('active');
            }
        }

//        侧栏
        $('.panel-left .item-content').click(function(){
            var index = $(this).index();
//            console.log(index);
            $(this).addClass('active').siblings('.item-content').removeClass('active');
            $('.infinite-scroll-bottom .list-container').html("666" + index);
        });
      });
    </script>

  </body>
</html>
